package com.onec.service.route.entity;


import com.onec.service.api.enums.ProductEnum;
import com.onec.service.api.enums.StatusEnum;
import com.onec.service.api.enums.SystemTypeEnum;
import lombok.Data;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 代理商
 * 渠道信息。
 *
 * @author ONEC
 */
@Data
@Entity
@Table(name = "t_trade_config_info")
public class TradeConfigInfo implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", unique = true)
    private Long id;

    @Column(name = "business_no", unique = true)
    private String businessNo;

    @Column(name = "version", length = 8)
    @Version
    private Integer version;

    @Column(name = "code", length = 16)
    private String code;

    @Column(name = "product", length = 8)
    @Enumerated(value = EnumType.STRING)
    private ProductEnum product;

    @Column(name = "type", length = 16)
    @Enumerated(value = EnumType.STRING)
    private SystemTypeEnum type;

    @Column(name = "contacts", length = 32)
    private String contacts;

    @Column(name = "create_time")
    @CreatedDate
    @Temporal(TemporalType.TIMESTAMP)
    private Date createTime;

    @Column(name = "update_time")
    @LastModifiedDate
    @Temporal(TemporalType.TIMESTAMP)
    private Date updateTime;

    @Column(name = "creator", length = 32)
    private String creator;

    @Column(name = "remarks")
    private String remarks;
    /**
     * 交易状态
     */
    @Column(name = "status", length = 8)
    @Enumerated(value = EnumType.STRING)
    private StatusEnum status;

    /**
     * 是否可以提现状态
     */
    @Column(name = "draw_status", length = 8)
    @Enumerated(value = EnumType.STRING)
    private StatusEnum drawStatus;


}
